package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import po.DyhType;
import service.typeService;

import java.util.List;

/**
 * Created by napianlin on 2017/4/1.
 */

@Controller

public class typeController {

    @Autowired
    private typeService service;

    @RequestMapping("/type/list")
    public String getList(Model model) {
        List<DyhType> list = service.getTypeList();
        model.addAttribute("list", list);
        return "homepage";
    }
}
